import service from "@/utils/request"

export interface TypeDataParametersInterface {
    total?: number,
    list: list[]
}

export interface list {
    style: string,
    color: string,
    colorCode: string,
    photoPath: string
}

export interface TypeDataParameters {
    color: string,
    pageNum: number,
    pageSize: number,
    style: string
}

export const TypeDataParametersDate = (params: TypeDataParameters) => {
    return service.post<any, TypeDataParametersInterface>('/quotation/craft/getPcStyleCraftHead', params)
}

export interface ObtainTheProcessParametersOfMoldProduction {
    style: string
    color: string
    flag: string
}

export interface listOtle {
    seqNo: number,
    partName: string,
    mtlName: string,
    mtlUnit: string,
    cutLayer: number,
    cutNum2: number,
    cutNum: number,
    cutSeq: string,
    deptName: string,
    process1: string,
    process2: string,
    process3: string,
    process4: string,
    process5: string,
    process6: null,
    process7: null,
    process8: null,
    process9: null,
    process10: null
}

export interface listOlt{
    list:listOtle[]
}

export const AcquireTheMoldProductionProcess = (params: ObtainTheProcessParametersOfMoldProduction) => {
    return service.get<any,listOlt>('/quotation/craft/getPcStyleCraftDetail', {
        params: { style: params.style, color: params.color, flag: params.flag }
    })
}
